@AccessControl.authorizationCheck: #NOT_REQUIRED
@Metadata.allowExtensions: true
@ObjectModel.sapObjectNodeType.name: 'ZYMOON_T_150'
@EndUserText.label: '###GENERATED Core Data Service Entity'
define root view entity ZR_YMOON_T_150
  as select from ymoon_t_150
{
  key matnr as Matnr,
  @ObjectModel.text.element: [ 'StatusText' ]
  status as Status,
  
  case status 
  when 'D' then 1 else 3 end as Critical,
  @Semantics.text: true
  case status 
  when 'D' then cast('Deleted' as abap.char( 20 )) else cast('Activated' as abap.char( 20 )) end as StatusText,
  @Semantics.systemDateTime.createdAt: true
  create_at as CreateAt,
  @Semantics.user.createdBy: true
  create_by as CreateBy,
  @Semantics.systemDateTime.lastChangedAt: true
  changed_at as ChangedAt,
  @Semantics.user.lastChangedBy: true
  changed_by as ChangedBy,
  @Semantics.user.localInstanceLastChangedBy: true
  local_last_changed_by as LocalLastChangedBy,
  @Semantics.systemDateTime.localInstanceLastChangedAt: true
  local_last_changed_at as LocalLastChangedAt
} 
